package com.irain.pp.tool;

/**
 * @author WangYanPeng
 * @date 2017/11/4 21:36
 */
public class ExceptionUtils {

    public static RuntimeException transfer(Throwable t) {
        ExceptionUtils.toThrow(t);
        return new UnsupportedOperationException();
    }

    @SuppressWarnings("unchecked")
    private static <T extends Throwable> void toThrow(Throwable t) throws T {
        throw (T)t;
    }
}
